﻿using System.Collections.Generic;
using System;
using UnityEngine;
using System.Collections;

namespace Anderson.PluginFramework
{
    public interface IFramework : IPlugin, IServiceBus, IContextListener
    {
        /// <summary>
        /// 得到框架中所有的插件
        /// </summary>
        IList<IPlugin> AllPlugin { get; }

        /// <summary>
        /// 需要变成GameObject的插件，存放在一个统一的Project对象下面
        /// </summary>
        Transform PluginRootTransform { get; set; }

        void InstallPlugin(PluginEntity entity);
        IEnumerator AsyncInstallPlugin(PluginEntity entity);
        void UninstallPlugin(IPlugin plugin);

        IList<Type> CommonServices { set; }

        IList<PluginEntity> RootEntities { set; }

        bool AutoStartBeforeLoaded { get; set; }
    }
}